var layerId;
$(function(){
	$("#add-button").click(function(){
		layerId=layer.open({
			title: "添加会员等级",
			area: ['50%','50%'],
			fix:true,
			type: 2,
			content: basePath+'/userGrade/add.shtml'
		});
	})
})
function editFun(gradeId){
	layerId=layer.open({
		title: "修改会员等级",
		area: ['50%','50%'],
		fix:true,
		type: 2,
		content: basePath+'/userGrade/edit.shtml?gradeId='+gradeId
	});
}
function deleteFun(gradeId){
	if(confirm("确认删除？")){
		 $.ajax({
	  		 url:basePath+"/userGrade/delete.shtml?gradeId="+gradeId,  
	  		 type:"post",
	  		 dataType:"JSON",
	  		 success:ajaxSuccessRefreshFun
	  	 });
	}
}